#ifndef _GAME_OBJECT_MANAGER_H
#define _GAME_OBJECT_MANAGER_H

#include <vector>
#include "..\Generic\GameTime.h"
#include "..\Components\GameObject.h"

class GameObjectManager
{
public:
	GameObjectManager();
	virtual ~GameObjectManager();

	void addGameObject(GameObject* p_gameObject) { m_queueList.push_back(p_gameObject); }
	void removeGameObject(GameObject* p_gameObject) { m_removeGameObjects.push_back(p_gameObject); }
	void update(const GameTime& p_gameTime);
	void clearGameObjects();
	GameObject* getGameObject(const std::string& p_name);

protected:
	std::vector<GameObject*> m_gameObjects;
	std::vector<GameObject*> m_removeGameObjects;
	std::vector<GameObject*> m_queueList;

	inline void remove(GameObject* p_gameObject);
};

#endif //_GAME_OBJECT_MANAGER_H